Example Program
Approximate Searching
Approximate string matching.
File "find_approx.cpp"
1 | |
2 | |
3 | |
4 | |
5 | |
6 |
This program finds all occurrences of CCT in AACTTAACCTAA with ≤ 1 error using the MyersUkkonen approximate search algorithm.
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 |
The function setScoreLimit sets the limit score an occurrence must reach.
Since the used scoring scheme is a distance measure (edit distance), all scores are negative.
A score limit of ≥ -1 therefore means a edit distance ≤ 1 .
14 | |
15 | |
16 | |
17 |
Note that position returns the end position of the found occurrence.
18 | |
19 | |
20 | |
21 | |
22 |
Output
4: -1
8: -1
9: 0
10: -1
See Also
SeqAn - Sequence Analysis Library - www.seqan.de